age = 23

if age >= 18:
    print("成年")
elif age < 18:
    print("未成年")

l = [1, 2, 3, 4, 5, 6, 7]

for i in l:
    print(i)

i = 1
sum = 0

while i <= 10:
    i += 1
    sum += i

print(sum)

#  每个元素乘以2
l = [1, 2, 3, 4, 5, 6, 7]

l2 = []

for i in l:
    l2.append(i * 2)

print(l2)

# 列表推导式，  对上面代码的简写
l3 = [i * 2 for i in l]
print(l3)

print("=" * 100)

# 待下标循环
for i, v in enumerate(l):
    print(i, v)
